package com.neusoft.tijiancms.controller;

import com.neusoft.tijiancms.po.Doctor;
import com.neusoft.tijiancms.service.DoctorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/DoctorController")
public class DoctorController {
    @Autowired
    private DoctorService doctorService;

    /**
     *请求地址：http://localhost:8088/tijiancms/DoctorController/getDoctorByCodeByPass?docCode=zzj&password=123
     * 根据医生编码和密码进行登录
     * @param doctor
     * @return
     */
    @RequestMapping("/getDoctorByCodeByPass")
    public Object getDoctorByCodeByPass(@RequestBody Doctor doctor){
    return doctorService.getDoctorByCodeByPass(doctor);
}
}
